package c.c.a;

import android.content.Context;
import android.os.SystemProperties;
import android.util.Base64;
import com.bytedance.embed_dr.VivoIdentifier;

public final class g1 implements d1 {
    public static final String b;
    public static final p0<Boolean> c = new a();
    public VivoIdentifier a;

    public static class a extends p0<Boolean> {
        public Object a(Object[] objArr) {
            return Boolean.valueOf("1".equals(g1.c(g1.b, "0")));
        }
    }

    static {
        String str;
        try {
            str = new String(Base64.decode("cGVyc2lzdC5zeXMuaWRlbnRpZmllcmlkLnN1cHBvcnRlZA==".getBytes("UTF-8"), 2));
        } catch (Exception unused) {
            str = "";
        }
        b = str;
    }

    /* JADX WARNING: Missing exception handler attribute for start block: B:3:0x0006 */
    /* JADX WARNING: Failed to process nested try/catch */
    /* JADX WARNING: Can't wrap try/catch for region: R(6:0|1|2|3|4|8) */
    /* JADX WARNING: Missing block: B:5:0x0011, code skipped:
            r3 = move-exception;
     */
    /* JADX WARNING: Missing block: B:6:0x0012, code skipped:
            c.c.a.u0.a("OaidVivo", android.util.Log.getStackTraceString(r3), null);
     */
    /* JADX WARNING: Missing block: B:7:?, code skipped:
            return;
     */
    public g1(android.content.Context r3) {
        /*
        r2 = this;
        r2.<init>();
        b.i.b.f.n(r3);	 Catch:{ all -> 0x0006 }
    L_0x0006:
        r0 = new com.bytedance.embed_dr.VivoIdentifier;	 Catch:{ all -> 0x0011 }
        r0.m2490init();	 Catch:{ all -> 0x0011 }
        r2.a = r0;	 Catch:{ all -> 0x0011 }
        r0.preloadOaid(r3);	 Catch:{ all -> 0x0011 }
        goto L_0x001c;
    L_0x0011:
        r3 = move-exception;
        r3 = android.util.Log.getStackTraceString(r3);
        r0 = 0;
        r1 = "OaidVivo";
        c.c.a.u0.a(r1, r3, r0);
    L_0x001c:
        return;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.c.a.g1.m5232init(android.content.Context):void");
    }

    public static String c(String str, String str2) {
        try {
            str2 = SystemProperties.get(str, str2);
            return str2;
        } catch (Throwable unused) {
            return str2;
        }
    }

    public boolean a(Context context) {
        return ((Boolean) c.b(new Object[0])).booleanValue();
    }

    public c.c.a.d1.a b(Context context) {
        VivoIdentifier vivoIdentifier = this.a;
        if (vivoIdentifier == null) {
            return null;
        }
        return vivoIdentifier.getOaid(context);
    }
}
